<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // // 有明确的语义,遇到不能转的东西会报错
        // var str = num.toString()
        //     // 强转(什么东西都能转换)
        // var str = String(num)
        //     // +号拼接字符
        // var str = num + ''
        var age = 10
        var str = age + ''
        console.log(typeof str);
    </script>
</body>

</html>